import request from '../index.js';
import qs from 'qs';

export const login = (data) => {
  return request({
    url: '/login',
    method: 'post',
    headers: {
      'Content-type': 'application/x-www-form-urlencoded'
    },
    data: qs.stringify(data)
  });
};

export const logout = () => {
  return request({
    url: '/logout',
    method: 'post'
  });
};

// 获取权限菜单
export const info = () => {
  return request({
    url: '/user/info',
    method: 'get'
  });
};
